home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / guile-ii.src / guile-ii / guile-src / guile-docs / user / scm.info-2 < prev    next >
Encoding:
GNU Info File  |  1995-06-08  |  48.1 KB  |  1,308 lines

  1. This is Info file scm.info, produced by Makeinfo-1.55 from the input
  2. file scm.texi.
  3.  
  4. 
  5. File: scm.info,  Node: Compiling And Linking,  Next: Numeric,  Prev: Packages,  Up: Packages
  6.  
  7. Compiling And Linking
  8. =====================
  9.  
  10.  - Function: compile-file NAME1 NAME2 ...
  11.      If the HOBBIT compiler is installed in the
  12.      `(implementation-vicinity)', compiles the files NAME1 NAME2 ... to
  13.      an object file name NAME1<object-suffix>, where <object-suffix> is
  14.      the object file suffix for your computer (for instance, `.o').
  15.      nAME1 must be in the current directory.  NAME2 ... can be in other
  16.      directories.
  17.  
  18.  - Function: link-named-scm NAME MODULE1 ...
  19.      Creates a new SCM executable with name NAME.  NAME will include
  20.      the object modules MODULE1 ... which can be produced with
  21.      compile-file.
  22.  
  23. If SCM has been compiled with `dynl.c' then the additional properties
  24. of load and require (from [SLIB]) specified below are supported.  The
  25. `require' forms are preferred.  The variable `*catalog*' can be
  26. extended to define other requirable packages.  See `Link.scm' for
  27. details.
  28.  
  29.  - Function: load FILENAME LIB1 ...
  30.      In addition to the [R4RS] requirement of loading Scheme
  31.      expressions if FILENAME is a Scheme source file, `load' will also
  32.      dynamically load/link object files (produced by `compile-file', for
  33.      instance).  The object-suffix need not be given to load.  For
  34.      example,
  35.  
  36.           (load (in-vicinity (implementation-vicinity) "sc2"))
  37.           or (load (in-vicinity (implementation-vicinity) "sc2.o"))
  38.           or (require 'rev2-procedures)
  39.           or (require 'rev3-procedures)
  40.  
  41.      will load/link `sc2.o' if it exists.
  42.  
  43.      The LIB1 ... pathnames are for additional libraries which may be
  44.      needed for object files not produced by the Hobbit compiler.  For
  45.      instance, crs is linked on Linux by
  46.  
  47.           (load (in-vicinity (implementation-vicinity) "crs.o")
  48.                 (usr:lib "ncurses") (usr:lib "c"))
  49.           or (require 'curses)
  50.  
  51.      Turtlegr graphics library is linked by:
  52.  
  53.           (load (in-vicinity (implementation-vicinity) "turtlegr")
  54.                 (usr:lib "X11") (usr:lib "c") (usr:lib "m"))
  55.           or (require 'turtle-graphics)
  56.  
  57.      And the string regular expression (*note Regular Expression
  58.      Pattern Matching::.) package is linked by:
  59.  
  60.           (load (in-vicinity (implementation-vicinity) "rgx") (usr:lib "c"))
  61.      or
  62.           (require 'regex)
  63.  
  64.  - Function: require 'DB
  65.  - Function: require 'WB
  66.      Either form will dynamically load the WB database system from the
  67.      wb:vicinity (`../wb/') specified in `Link.scm'.  See
  68.      `scm/ANNOUNCE' for ftp sites where WB is available.
  69.  
  70. The following functions comprise the low-level Scheme interface to
  71. dynamic linking.  See the file `Link.scm' in the SCM distribution for
  72. an example of their use.
  73.  
  74.  - Function: dyn:link FILENAME
  75.      FILENAME should be a string naming an "object" or "archive" file,
  76.      the result of C-compiling.  The `dyn:link' procedure links and
  77.      loads FILENAME into the current SCM session.  If successfull,
  78.      `dyn:link' returns a "link-token" suitable for passing as the
  79.      second argument to `dyn:call'.  If not successful, `#f' is
  80.      returned.
  81.  
  82.  - Function: dyn:call NAME LINK-TOKEN
  83.      LINK-TOKEN should be the value returned by a call to `dyn:link'.
  84.      nAME should be the name of C function of no arguments defined in
  85.      the file named FILENAME which was succesfully `dyn:link'ed in the
  86.      current SCM session.  The `dyn:call' procedure calls the C
  87.      function corresponding to NAME.  If successful, `dyn:call' returns
  88.      `#t'; If not successful, `#f' is returned.
  89.  
  90.      `dyn:call' is used to call the "init_..." function after loading
  91.      SCM object files.  The init_... function then makes the
  92.      identifiers defined in the file accessible as Scheme procedures.
  93.  
  94.  - Function: dyn:unlink LINK-TOKEN
  95.      LINK-TOKEN should be the value returned by a call to `dyn:link'.
  96.      The `dyn:unlink' procedure removes the previously loaded file from
  97.      the current SCM session.  If successful, `dyn:unlink' returns
  98.      `#t'; If not successful, `#f' is returned.
  99.  
  100.  - Function: usr:lib LIB
  101.      Returns the pathname of the C library named lib.  For example:
  102.      `(usr:lib "m")' could return `"/usr/lib/libm.a"', the path of the
  103.      C math library.
  104.  
  105. 
  106. File: scm.info,  Node: Numeric,  Next: Arrays,  Prev: Compiling And Linking,  Up: Packages
  107.  
  108. Numeric
  109. =======
  110.  
  111.  - Constant: most-positive-fixnum
  112.      The immediate integer closest to positive infinity.  *Note
  113.      Configuration: (slib)Configuration.
  114.  
  115.  - Constant: most-negative-fixnum
  116.      The immediate integer closest to negative infinity.
  117.  
  118. These procedures augment the standard capabilities in *Note Numerical
  119. operations: (r4rs)Numerical operations.
  120.  
  121.  - Function: sinh Z
  122.  - Function: cosh Z
  123.  - Function: tanh Z
  124.      Return the hyperbolic sine, cosine, and tangent of Z
  125.  
  126.  - Function: asinh Z
  127.  - Function: acosh Z
  128.  - Function: atanh Z
  129.      Return the inverse hyperbolic sine, cosine, and tangent of Z
  130.  
  131.  - Function: $sqrt X
  132.  - Function: $abs X
  133.  - Function: $exp X
  134.  - Function: $log X
  135.  - Function: $sin X
  136.  - Function: $cos X
  137.  - Function: $tan X
  138.  - Function: $asin X
  139.  - Function: $acos X
  140.  - Function: $atan X
  141.  - Function: $sinh X
  142.  - Function: $cosh X
  143.  - Function: $tanh X
  144.  - Function: $asinh X
  145.  - Function: $acosh X
  146.  - Function: $atanh X
  147.      Real-only versions of these popular functions.  The argument X
  148.      must be a real number.  It is an error if the value which should be
  149.      returned by a call to these procedures is *not* real.
  150.  
  151.  - Function: $atan2 Y X
  152.      Computes `(angle (make-rectangular x y))' for real numbers Y and X.
  153.  
  154.  - Function: $expt X1 X2
  155.      Returns real number X1 raised to the real power X2.  It is an
  156.      error if the value which should be returned by a call to `$expt'
  157.      is not real.
  158.  
  159. 
  160. File: scm.info,  Node: Arrays,  Next: I/O-Extensions,  Prev: Numeric,  Up: Packages
  161.  
  162. Arrays
  163. ======
  164.  
  165. * Menu:
  166.  
  167. * Conventional Arrays::
  168. * Array Mapping::
  169. * Uniform Array::
  170. * Bit Vectors::
  171.  
  172. 
  173. File: scm.info,  Node: Conventional Arrays,  Next: Array Mapping,  Prev: Arrays,  Up: Arrays
  174.  
  175. Conventional Arrays
  176. -------------------
  177.  
  178.   "Arrays" read and write as a `#' followed by the "rank" (number of
  179. dimensions) followed by what appear as lists (of lists) of elements.
  180. The lists must be nested to the depth of the rank.  For each depth, all
  181. lists must be the same length.
  182.      (make-array 'ho 3 3) =>
  183.      #2((ho ho ho) (ho ho ho) (ho ho ho))
  184.  
  185.   Unshared conventional (not uniform) 0-based arrays of rank 1
  186. (dimension) are equivalent to (and can't be distinguished from) vectors.
  187.      (make-array 'ho 3) => (ho ho ho)
  188.  
  189.   When constructing an array, BOUND is either an inclusive range of
  190. indices expressed as a two element list, or an upper bound expressed as
  191. a single integer.  So
  192.      (make-array 'foo 3 3) == (make-array 'foo '(0 2) '(0 2))
  193.  
  194.  - Function: array? OBJ
  195.      Returns `#t' if the OBJ is an array, and `#f' if not.
  196.  
  197.  - Function: make-array INITIAL-VALUE BOUND1 BOUND2 ...
  198.      Creates and returns an array that has as many dimensions as there
  199.      are BOUNDs and fills it with INITIAL-VALUE.
  200.  
  201.  - Function: array-ref ARRAY INDEX1 INDEX2 ...
  202.      Returns the element at the `(index1, index2)' element in ARRAY.
  203.  
  204.  - Function: array-in-bounds? ARRAY INDEX1 INDEX2 ...
  205.      Returns `#t' if its arguments would be acceptable to array-ref.
  206.  
  207.  - Function: array-set! ARRAY NEW-VALUE INDEX1 INDEX2 ...
  208.      Sets the element at the `(index1, index2)' element in ARRAY to
  209.      NEW-VALUE.  The value returned by array-set! is unspecified.
  210.  
  211.  - Function: make-shared-array ARRAY MAPPER BOUND1 BOUND2 ...
  212.      `make-shared-array' can be used to create shared subarrays of other
  213.      arrays.  The MAPPER is a function that translates coordinates in
  214.      the new array into coordinates in the old array.  A MAPPER must be
  215.      linear, and its range must stay within the bounds of the old
  216.      array, but it can be otherwise arbitrary.  A simple example:
  217.           (define fred (make-array #f 8 8))
  218.           (define freds-diagonal
  219.             (make-shared-array fred (lambda (i) (list i i)) 8))
  220.           (array-set! freds-diagonal 'foo 3)
  221.           (array-ref fred 3 3) => foo
  222.           (define freds-center
  223.             (make-shared-array fred (lambda (i j) (list (+ 3 i) (+ 3 j))) 2 2))
  224.           (array-ref freds-center 0 0) => foo
  225.  
  226.  - Function: transpose-array ARRAY DIM0 DIM1 ...
  227.      Returns an array sharing contents with ARRAY, but with dimensions
  228.      arranged in a different order.  There must be one DIM argument for
  229.      each dimension of ARRAY.  DIM0, DIM1, ... should be integers
  230.      between 0 and the rank of the array to be returned.  Each integer
  231.      in that range must appear at least once in the argument list.
  232.  
  233.      The values of DIM0, DIM1, ... correspond to dimensions in the
  234.      array to be returned, their positions in the argument list to
  235.      dimensions of ARRAY.  Several DIMs may have the same value, in
  236.      which case the returned array will have smaller rank than ARRAY.
  237.  
  238.      examples:
  239.           (transpose-array '#2((a b) (c d)) 1 0) => #2((a c) (b d))
  240.           (transpose-array '#2((a b) (c d)) 0 0) => #1(a d)
  241.           (transpose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 1 0) =>
  242.                           #2((a 4) (b 5) (c 6))
  243.  
  244.  - Function: enclose-array ARRAY DIM0 DIM1 ...
  245.      DIM0, DIM1 ... should be nonnegative integers less than the rank
  246.      of ARRAY.  ENCLOSE-ARRAY returns an array resembling an array of
  247.      shared arrays.  The dimensions of each shared array are the same
  248.      as the DIMth dimensions of the original array, the dimensions of
  249.      the outer array are the same as those of the original array that
  250.      did not match a DIM.
  251.  
  252.      An enclosed array is not a general Scheme array.  Its elements may
  253.      not be set using `array-set!'.  Two references to the same element
  254.      of an enclosed array will be `equal?' but will not in general be
  255.      `eq?'.  The value returned by ARRAY-PROTOTYPE when given an
  256.      enclosed array is unspecified.
  257.  
  258.      examples:
  259.           (enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1) =>
  260.              #<enclosed-array (#1(a d) #1(b e) #1(c f)) (#1(1 4) #1(2 5) #1(3 6))>
  261.           
  262.           (enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 0) =>
  263.              #<enclosed-array #2((a 1) (d 4)) #2((b 2) (e 5)) #2((c 3) (f 6))>
  264.  
  265.  - Function: array-shape ARRAY
  266.      Returns a list of inclusive bounds of integers.
  267.           (array-shape (make-array 'foo '(-1 3) 5)) => ((-1 3) (0 4))
  268.  
  269.  - Function: array-dimensions ARRAY
  270.      `Array-dimensions' is similar to `array-shape' but replaces
  271.      elements with a `0' minimum with one greater than the maximum. So:
  272.           (array-dimensions (make-array 'foo '(-1 3) 5)) => ((-1 3) 5)
  273.  
  274.  - Function: array-rank OBJ
  275.      Returns the number of dimensions of OBJ.  If OBJ is not an array,
  276.      `0' is returned.
  277.  
  278.  - Function: array->list ARRAY
  279.      Returns a list consisting of all the elements, in order, of ARRAY.
  280.  
  281.  - Function: array-copy! SOURCE DESTINATION
  282.      Copies every element from vector or array SOURCE to the
  283.      corresponding element of DESTINATION.  DESTINATION must have the
  284.      same rank as SOURCE, and be at least as large in each dimension.
  285.      The order is unspecified.
  286.  
  287.  - Function: serial-array-copy! SOURCE DESTINATION
  288.      Same as `array-copy!' but guaranteed to copy in row-major order.
  289.  
  290.  - Function: array-fill! ARRAY FILL
  291.      Stores FILL in every element of ARRAY.  The value returned is
  292.      unspecified.
  293.  
  294.  - Function: array-equal? ARRAY0 ARRAY1 ...
  295.      Returns `#t' iff all arguments are arrays with the same shape, the
  296.      same type, and have corresponding elements which are either
  297.      `equal?'  or `array-equal?'.  This function differs from `equal?'
  298.      in that a one dimensional shared array may be ARRAY-EQUAL? but not
  299.      EQUAL? to a vector or uniform vector.
  300.  
  301.  - Function: array-contents ARRAY
  302.  - Function: array-contents ARRAY STRICT
  303.      If ARRAY may be "unrolled" into a one dimensional shared array
  304.      without changing their order (last subscript changing fastest),
  305.      then `array-contents' returns that shared array, otherwise it
  306.      returns `#f'.  All arrays made by MAKE-ARRAY and
  307.      MAKE-UNIFORM-ARRAY may be unrolled, some arrays made by
  308.      MAKE-SHARED-ARRAY may not be.
  309.  
  310.      If the optional argument STRICT is provided, a shared array will
  311.      be returned only if its elements are stored internally contiguous
  312.      in memory.
  313.  
  314. 
  315. File: scm.info,  Node: Array Mapping,  Next: Uniform Array,  Prev: Conventional Arrays,  Up: Arrays
  316.  
  317. Array Mapping
  318. -------------
  319.  
  320.  - Function: array-map! ARRAY0 PROC ARRAY1 ...
  321.      ARRAY1, ... must have the same number of dimensions as ARRAY0 and
  322.      have a range for each index which includes the range for the
  323.      corresponding index in ARRAY0.  PROC is applied to each tuple of
  324.      elements of ARRAY1 ... and the result is stored as the
  325.      corresponding element in ARRAY0.  The value returned is
  326.      unspecified.  The order of application is unspecified.
  327.  
  328.  - Function: serial-array-map! ARRAY0 PROC ARRAY1 ...
  329.      Same as ARRAY-MAP!, but guaranteed to apply PROC in row-major
  330.      order.
  331.  
  332.  - Function: array-for-each PROC ARRAY0 ...
  333.      PROC is applied to each tuple of elements of ARRAY0 ...  in
  334.      row-major order.  The value returned is unspecified.
  335.  
  336.  - Function: array-index-map! ARRAY PROC
  337.      applies PROC to the indices of each element of ARRAY in turn,
  338.      storing the result in the corresponding element.  The value
  339.      returned and the order of application are unspecified.
  340.  
  341.      One can implement ARRAY-INDEXES as
  342.           (define (array-indexes array)
  343.               (let ((ra (apply make-array #f (array-shape array))))
  344.                 (array-index-map! ra (lambda x x))
  345.                 ra))
  346.      Another example:
  347.           (define (apl:index-generator n)
  348.               (let ((v (make-uniform-vector n 1)))
  349.                 (array-index-map! v (lambda (i) i))
  350.                 v))
  351.  
  352. 
  353. File: scm.info,  Node: Uniform Array,  Next: Bit Vectors,  Prev: Array Mapping,  Up: Arrays
  354.  
  355. Uniform Array
  356. -------------
  357.  
  358. "Uniform Arrays" and vectors are arrays whose elements are all of the
  359. same type.  Uniform vectors occupy less storage than conventional
  360. vectors.  Uniform Array procedures also work on vectors,
  361. uniform-vectors, bit-vectors, and strings.
  362.  
  363. PROTOTYPE arguments in the following procedures are interpreted
  364. according to the table:
  365.  
  366.      prototype       type                            printing character
  367.      
  368.      #t              boolean (bit-vector)                    b
  369.      #\a             char (string)                           a
  370.      integer >0      unsigned integer                        u
  371.      integer <0      signed integer                          e
  372.      1.0             float (single precision)                s
  373.      1/3             double (double precision float)         i
  374.      +i              complex (double precision)              c
  375.      ()              conventional vector
  376.  
  377. Unshared uniform character 0-based arrays of rank 1 (dimension) are
  378. equivalent to (and can't be distinguished from) strings.
  379.      (make-uniform-array #\a 3) => "$q2"
  380.  
  381. Unshared uniform boolean 0-based arrays of rank 1 (dimension) are
  382. equivalent to (and can't be distinguished from) *Note bit-vectors: Bit
  383. Vectors.
  384.      (make-uniform-array #t 3) => #*000
  385.      ==
  386.      #b(#f #f #f) => #*000
  387.      ==
  388.      #1b(#f #f #f) => #*000
  389.  
  390. Other uniform vectors are written in a form similar to that of vectors,
  391. except that a single character from the above table is put between `#'
  392. and `('.  For example, `'#e(3 5 9)' returns a uniform vector of signed
  393. integers.
  394.  
  395.  - Function: array? OBJ PROTOTYPE
  396.      Returns `#t' if the OBJ is an array of type corresponding to
  397.      PROTOTYPE, and `#f' if not.
  398.  
  399.  - Function: make-uniform-array PROTOTYPE BOUND1 BOUND2 ...
  400.      Creates and returns a uniform array of type corresponding to
  401.      PROTOTYPE that has as many dimensions as there are BOUNDs and
  402.      fills it with PROTOTYPE.
  403.  
  404.  - Function: array-prototype ARRAY
  405.      Returns an object that would produce an array of the same type as
  406.      ARRAY, if used as the PROTOTYPE for `make-uniform-array'.
  407.  
  408.  - Function: list->uniform-array RANK PROT LST
  409.  - Function: list->uniform-vector PROT LST
  410.      Returns a uniform array of the type indicated by prototype PROT
  411.      with elements the same as those of LST.  Elements must be of the
  412.      appropriate type, no coercions are done.
  413.  
  414.  - Function: uniform-vector-fill! UVE FILL
  415.      Stores FILL in every element of UVE.  The value returned is
  416.      unspecified.
  417.  
  418.  - Function: uniform-vector-length UVE
  419.      Returns the number of elements in UVE.
  420.  
  421.  - Function: dimensions->uniform-array DIMS PROTOTYPE FILL
  422.  - Function: dimensions->uniform-array DIMS PROTOTYPE
  423.  - Function: make-uniform-vector LENGTH PROTOTYPE FILL
  424.  - Function: make-uniform-vector LENGTH PROTOTYPE
  425.      Creates and returns a uniform array or vector of type
  426.      corresponding to PROTOTYPE with dimensions DIMS or length LENGTH.
  427.      If the FILL argument is supplied, the returned array is filled with
  428.      this value.
  429.  
  430.  - Function: uniform-array-read! URA
  431.  - Function: uniform-array-read! URA PORT
  432.  - Function: uniform-vector-read! UVE
  433.  - Function: uniform-vector-read! UVE PORT
  434.      Attempts to read all elements of URA, in lexicographic order, as
  435.      binary objects from PORT.  If an end of file is encountered during
  436.      uniform-array-read! the objects up to that point only are put into
  437.      URA (starting at the beginning) and the remainder of the array is
  438.      unchanged.
  439.  
  440.      `uniform-array-read!' returns the number of objects read.  PORT
  441.      may be omitted, in which case it defaults to the value returned by
  442.      `(current-input-port)'.
  443.  
  444.  - Function: uniform-array-write URA
  445.  - Function: uniform-array-write URA PORT
  446.  - Function: uniform-vector-write UVE
  447.  - Function: uniform-vector-write UVE PORT
  448.      Writes all elements of URA as binary objects to PORT. The number
  449.      of of objects actually written is returned. PORT may be omitted,
  450.      in which case it defaults to the value returned by
  451.      `(current-output-port)'.
  452.  
  453. 
  454. File: scm.info,  Node: Bit Vectors,  Prev: Uniform Array,  Up: Arrays
  455.  
  456. Bit Vectors
  457. -----------
  458.  
  459. Bit vectors can be written and read as a sequence of `0's and `1's
  460. prefixed by `#*'.
  461.  
  462.      #b(#f #f #f #t #f #t #f) => #*0001010
  463.  
  464. Some of these operations will eventually be generalized to other
  465. uniform-arrays.
  466.  
  467.  - Function: bit-count BOOL BV
  468.      Returns the number occurrences of BOOL in BV.
  469.  
  470.  - Function: bit-position BOOL BV K
  471.      Returns the minimum index of an occurrence of BOOL in BV which is
  472.      at least K.  If no BOOL occurs within the specified range `#f' is
  473.      returned.
  474.  
  475.  - Function: bit-invert! BV
  476.      Modifies BV by replacing each element with its negation.
  477.  
  478.  - Function: bit-set*! BV UVE BOOL
  479.      If uve is a bit-vector BV and uve must be of the same length.  If
  480.      BOOL is `#t', uve is OR'ed into BV; If BOOL is `#f', the inversion
  481.      of uve is AND'ed into BV.
  482.  
  483.      If uve is a unsigned integer vector all the elements of uve must be
  484.      between 0 and the `LENGTH' of BV.  The bits of BV corresponding to
  485.      the indexes in uve are set to BOOL.
  486.  
  487.      The return value is unspecified.
  488.  
  489.  - Function: bit-count* BV UVE BOOL
  490.      Returns
  491.           (bit-count (bit-set*! (if bool bv (bit-invert! bv)) uve #t) #t).
  492.      BV is not modified.
  493.  
  494. 
  495. File: scm.info,  Node: I/O-Extensions,  Next: Posix Extensions,  Prev: Arrays,  Up: Packages
  496.  
  497. I/O-Extensions
  498. ==============
  499.  
  500. If `'i/o-extensions' is provided (by linking in `ioext.o'), *Note Line
  501. I/O: (slib)Line I/O, and the following functions are defined:
  502.  
  503.  - Function: isatty? PORT
  504.      Returns `#t' if PORT is input or output to a serial non-file
  505.      device.
  506.  
  507.  - Function: stat <PORT-OR-STRING>
  508.      Returns a vector of integers describing the argument.  The argument
  509.      can be either a string or an open input port. If the argument is an
  510.      open port then the returned vector describes the file to which the
  511.      port is opened; If the argument is a string then the returned
  512.      vector describes the file named by that string.  If there exists
  513.      no file with the name string, or if the file cannot be accessed
  514.      `#f' is returned.  The elements of the returned vector are as
  515.      follows:
  516.  
  517.     0  st_dev
  518.           ID of device containing a directory entry for this file
  519.  
  520.     1  st_ino
  521.           Inode number
  522.  
  523.     2  st_mode
  524.           File type, attributes, and access control summary
  525.  
  526.     3  st_nlink
  527.           Number of links
  528.  
  529.     4  st_uid
  530.           User ID of file owner
  531.  
  532.     5  st_gid
  533.           Group ID of file group
  534.  
  535.     6  st_rdev
  536.           Device ID; this entry defined only for char or blk spec files
  537.  
  538.     7  st_size
  539.           File size (bytes)
  540.  
  541.     8  st_atime
  542.           Time of last access
  543.  
  544.     9  st_mtime
  545.           Last modification time
  546.  
  547.     10 st_ctime
  548.           Last file status change time
  549.  
  550.  - Function: getpid
  551.      Returns the process ID of the current process.
  552.  
  553.  - Function: file-position PORT
  554.      Returns the current position of the character in PORT which will
  555.      next be read or written.  If PORT is not open to a file the result
  556.      is unspecified.
  557.  
  558.  - Function: file-set-position PORT INTEGER
  559.      Sets the current position in PORT which will next be read or
  560.      written.  If PORT is not open to a file the action of
  561.      `file-set-position' is unspecified.  The result of
  562.      `file-set-position' is unspecified.
  563.  
  564.  - Function: reopen-file FILENAME MODES PORT
  565.      Closes port PORT and reopens it with FILENAME and MODES.
  566.      `reopen-file' returns `#t' if successful, `#f' if not.
  567.  
  568.  - Function: duplicate-port PORT MODES
  569.      Creates and returns a "duplicate" port from PORT.  Duplicate
  570.      *unbuffered* ports share one file position.  MODES are as for
  571.      *Note open-file: Files and Ports.
  572.  
  573.  - Function: redirect-port! FROM-PORT TO-PORT
  574.      Closes TO-PORT and makes TO-PORT be a duplicate of FROM-PORT.
  575.      `redirect-port!' returns TO-PORT if successful, `#f' if not.  If
  576.      unsuccessful, TO-PORT is not closed.
  577.  
  578.  - Function: opendir DIRNAME
  579.      Returns a "directory" object corresponding to the file system
  580.      directory named DIRNAME.  If unsuccessful, returns `#f'.
  581.  
  582.  - Function: readdir DIR
  583.      Returns the string name of the next entry from the directory DIR.
  584.      If there are no more entries in the directory, `readdir' returns a
  585.      `#f'.
  586.  
  587.  - Function: rewinddir DIR
  588.      Reinitializes DIR so that the next call to `readdir' with DIR will
  589.      return the first entry in the directory again.
  590.  
  591.  - Function: closedir DIR
  592.      Closes DIR and returns `#t'.  If DIR is already closed,,
  593.      `closedir' returns a `#f'.
  594.  
  595.  - Function: mkdir PATH MODE
  596.      The `mkdir' function creates a new, empty directory whose name is
  597.      PATH.  The integer argument MODE specifies the file permissions
  598.      for the new directory.  *Note The Mode Bits for Access Permission:
  599.      (libc)The Mode Bits for Access Permission, for more information
  600.      about this.
  601.  
  602.      `mkdir' returns if successful, `#f' if not.
  603.  
  604.  - Function: rmdir PATH
  605.      The `rmdir' function deletes the directory PATH.  The directory
  606.      must be empty before it can be removed.  `rmdir' returns if
  607.      successful, `#f' if not.
  608.  
  609.  - Function: chdir FILENAME
  610.      Changes the current directory to FILENAME.  If FILENAME does not
  611.      exist or is not a directory, `#f' is returned.  Otherwise, `#t' is
  612.      returned.
  613.  
  614.  - Function: getcwd
  615.      The function `getcwd' returns a string containing the absolute file
  616.      name representing the current working directory.  If this string
  617.      cannot be obtained, `#f' is returned.
  618.  
  619.  - Function: rename-file OLDFILENAME NEWFILENAME
  620.      Renames the file specified by OLDFILENAME to NEWFILENAME.  If the
  621.      renaming is successful, `#t' is returned.  Otherwise, `#f' is
  622.      returned.
  623.  
  624.  - Function: chmod FILE MODE
  625.      The function `chmod' sets the access permission bits for the file
  626.      named by FILE to MODE.  The FILE argument may be a string
  627.      containing the filename or a port open to the file.
  628.  
  629.      `chmod' returns if successful, `#f' if not.
  630.  
  631.  - Function: utime PATHNAME ACCTIME MODTIME
  632.      Sets the file times associated with the file named PATHNAME to
  633.      have access time ACCTIME and modification time MODTIME.  `utime'
  634.      returns if successful, `#f' if not.
  635.  
  636.  - Function: umask MODE
  637.      The function `umask' sets the file creation mask of the current
  638.      process to MASK, and returns the previous value of the file
  639.      creation mask.
  640.  
  641.  - Function: fileno PORT
  642.      Returns the integer file descriptor associated with the port PORT.
  643.      If an error is detected, `#f' is returned.
  644.  
  645.  - Function: access PATHNAME HOW
  646.      Returns `#t' if the file named by PATHNAME can be accessed in the
  647.      way specified by the HOW argument.  The HOW argument can be the
  648.      `logior' of the flags:
  649.  
  650.        0. File exists.
  651.  
  652.        1. File is executable.
  653.  
  654.        2. File is writable
  655.  
  656.        4. File is readable
  657.  
  658.  - Function: execl COMMAND ARG0 ...
  659.  - Function: execlp COMMAND ARG0 ...
  660.      Transfers control to program COMMAND called with arguments ARG0
  661.      ....  For `execl', COMMAND must be an exact pathname of an
  662.      executable file.  `execlp' searches for COMMAND in the list of
  663.      directories specified by the environment variable PATH.  The
  664.      convention is that ARG0 is the same name as COMMAND.
  665.  
  666.      If successful, this procedure does not return.  Otherwise an error
  667.      message is printed and the integer `errno' is returned.
  668.  
  669.  - Function: execv COMMAND ARGLIST
  670.  - Function: execvp COMMAND ARGLIST
  671.      Like `execl' and `execlp' except that the set of arguments to
  672.      COMMAND is ARGLIST.
  673.  
  674.  - Function: putenv STRING
  675.      adds or removes definitions from the "environment". If the STRING
  676.      is of the form `NAME=VALUE', the definition is added to the
  677.      environment.  Otherwise, the STRING is interpreted as the name of
  678.      an environment variable, and any definition for this variable in
  679.      the environment is removed.
  680.  
  681.      Names of environment variables are case-sensitive and must not
  682.      contain the character `='.  System-defined environment variables
  683.      are invariably uppercase.
  684.  
  685.      `Putenv' is used to set up the environment before calls to
  686.      `execl', `execlp', `execv', `execvp', `system', or `open-pipe'
  687.      (*note open-pipe: I/O-Extensions.).
  688.  
  689.      To access environment variables, use `getenv' (*note getenv:
  690.      (slib)System Interface.).
  691.  
  692. 
  693. File: scm.info,  Node: Posix Extensions,  Next: Regular Expression Pattern Matching,  Prev: I/O-Extensions,  Up: Packages
  694.  
  695. Posix Extensions
  696. ================
  697.  
  698. If `'posix' is provided (by linking in `posix.o'), the following
  699. functions are defined:
  700.  
  701.  - Function: open-pipe STRING MODES
  702.      If the string MODES contains an r, returns an input port capable
  703.      of delivering characters from the standard output of the system
  704.      command STRING.  Otherwise, returns an output port capable of
  705.      receiving characters which become the standard input of the system
  706.      command STRING.  If a pipe cannot be created `#f' is returned.
  707.  
  708.  - Function: open-input-pipe STRING
  709.      Returns an input port capable of delivering characters from the
  710.      standard output of the system command STRING.  If a pipe cannot be
  711.      created `#f' is returned.
  712.  
  713.  - Function: open-output-pipe STRING
  714.      Returns an output port capable of receiving characters which become
  715.      the standard input of the system command STRING.  If a pipe cannot
  716.      be created `#f' is returned.
  717.  
  718.  - Function: close-port PIPE
  719.      Closes the PIPE, rendering it incapable of delivering or accepting
  720.      characters.  This routine has no effect if the pipe has already
  721.      been closed.  The value returned is unspecified.
  722.  
  723.  - Function: pipe
  724.      Returns `(cons RD WD)' where RD and WD are the read and write
  725.      (port) ends of a "pipe" respectively.
  726.  
  727.  - Function: fork
  728.      Creates a copy of the process calling `fork'.  Both processes
  729.      return from `fork', but the calling ("parent") process's `fork'
  730.      returns the "child" process's ID whereas the child process's
  731.      `fork' returns 0.
  732.  
  733. For a discussion of "ID"s *Note Process Persona: (GNU C Library)Process
  734. Persona.
  735.  
  736.  - Function: getppid
  737.      Returns the process ID of the parent of the current process.  For
  738.      a process's own ID *Note getpid: I/O-Extensions.
  739.  
  740.  - Function: getuid
  741.      Returns the real user ID of this process.
  742.  
  743.  - Function: getgid
  744.      Returns the real group ID of this process.
  745.  
  746.  - Function: getegid
  747.      Returns the effective group ID of this process.
  748.  
  749.  - Function: geteuid
  750.      Returns the effective user ID of this process.
  751.  
  752.  - Function: setuid ID
  753.      Sets the real user ID of this process to ID.  Returns `#t' if
  754.      successful, `#f' if not.
  755.  
  756.  - Function: setgid ID
  757.      Sets the real group ID of this process to ID.  Returns `#t' if
  758.      successful, `#f' if not.
  759.  
  760.  - Function: setegid ID
  761.      Sets the effective group ID of this process to ID.  Returns `#t'
  762.      if successful, `#f' if not.
  763.  
  764.  - Function: seteuid ID
  765.      Sets the effective user ID of this process to ID.  Returns `#t' if
  766.      successful, `#f' if not.
  767.  
  768.  - Function: kill PID SIG
  769.      The `kill' function sends the signal SIGNUM to the process or
  770.      process group specified by PID.  Besides the signals listed in
  771.      *Note Standard Signals: (libc)Standard Signals, SIGNUM can also
  772.      have a value of zero to check the validity of the PID.
  773.  
  774.      The PID specifies the process or process group to receive the
  775.      signal:
  776.  
  777.     > 0
  778.           The process whose identifier is PID.
  779.  
  780.     0
  781.           All processes in the same process group as the sender.  The
  782.           sender itself does not receive the signal.
  783.  
  784.     -1
  785.           If the process is privileged, send the signal to all
  786.           processes except for some special system processes.
  787.           Otherwise, send the signal to all processes with the same
  788.           effective user ID.
  789.  
  790.     < -1
  791.           The process group whose identifier is `(abs PID)'.
  792.  
  793.      A process can send a signal to itself with `(kill (getpid)
  794.      SIGNUM)'.  If `kill' is used by a process to send a signal to
  795.      itself, and the signal is not blocked, then `kill' delivers at
  796.      least one signal (which might be some other pending unblocked
  797.      signal instead of the signal SIGNUM) to that process before it
  798.      returns.
  799.  
  800.      The return value from `kill' is zero if the signal can be sent
  801.      successfully.  Otherwise, no signal is sent, and a value of `-1' is
  802.      returned.  If PID specifies sending a signal to several processes,
  803.      `kill' succeeds if it can send the signal to at least one of them.
  804.      There's no way you can tell which of the processes got the signal
  805.      or whether all of them did.
  806.  
  807.  - Function: waitpid PID OPTIONS
  808.      The `waitpid' function suspends execution of the current process
  809.      until a child as specified by the PID argument has exited, or
  810.      until a signal is deliverd whose action is to terminate the
  811.      current process or to call a signal handling function.  If a child
  812.      as requested by PID has already exited by the time of the call (a
  813.      so-called "zombie" process), the function returns immediately.
  814.      Any system resources used by the child are freed.
  815.  
  816.      The value of PID can be one of:
  817.  
  818.     < -1
  819.           which means to wait for any child process whose process group
  820.           ID is equal to the absolute value of
  821.  
  822.     -1
  823.           which means to wait for any child process whose process group
  824.           ID is equal to the `(abs PID)'.
  825.  
  826.     -1
  827.           which means to wait for any child process; this is the same
  828.           behaviour which wait exhibits.
  829.  
  830.     0
  831.           which means to wait for any child process whose process group
  832.           ID is equal to that of the calling process.
  833.  
  834.     > 0
  835.           which means to wait for the child whose process ID is equal
  836.           to the value of PID.
  837.  
  838.      The value of OPTIONS is one of the following:
  839.  
  840.        0. Nothing special.
  841.  
  842.        1. (`WNOHANG') which means to return immediately if no child is
  843.           there to be waited for.
  844.  
  845.        2. (`WUNTRACED') which means to also return for children which
  846.           are stopped, and whose status has not been reported.
  847.  
  848.        3. Which means both of the above.
  849.  
  850.      The return value is normally the process ID of the child process
  851.      whose status is reported.  If the `WNOHANG' option was specified
  852.      and no child process is waiting to be noticed, the value is zero.
  853.      A value of `#f' is returned in case of error and `errno' is set.
  854.      For information about the `errno' codes *Note Process Completion:
  855.      (GNU C Library)Process Completion.
  856.  
  857.  - Function: uname
  858.      You can use the `uname' procedure to find out some information
  859.      about the type of computer your program is running on.
  860.  
  861.      Returns a vector of strings.  These strings are:
  862.  
  863.        0. The name of the operating system in use.
  864.  
  865.        1. The network name of this particular computer.
  866.  
  867.        2. The current release level of the operating system
  868.           implementation.
  869.  
  870.        3. The current version level within the release of the operating
  871.           system.
  872.  
  873.        4. Description of the type of hardware that is in use.
  874.  
  875.           Some examples are `"i386-ANYTHING"', `"m68k-hp"',
  876.           `"sparc-sun"', `"m68k-sun"', `"m68k-sony"' and `"mips-dec"'.
  877.  
  878.  - Function: getpw NAME
  879.  - Function: getpw UID
  880.  - Function: getpw
  881.      Returns a vector of information for the entry for `NAME', `UID',
  882.      or the next entry if no argument is given.  The information is:
  883.  
  884.        0. The user's login name.
  885.  
  886.        1. The encrypted password string.
  887.  
  888.        2. The user ID number.
  889.  
  890.        3. The user's default group ID number.
  891.  
  892.        4. A string typically containing the user's real name, and
  893.           possibly other information such as a phone number.
  894.  
  895.        5. The user's home directory, initial working directory, or
  896.           `#f', in which case the interpretation is system-dependent.
  897.  
  898.        6. The user's default shell, the initial program run when the
  899.           user logs in, or `#f', indicating that the system default
  900.           should be used.
  901.  
  902.  - Function: setpwent #T
  903.      Rewinds the pw entry table back to the begining.
  904.  
  905.  - Function: setpwent #F
  906.  - Function: setpwent
  907.      Closes the pw table.
  908.  
  909.  - Function: getgr NAME
  910.  - Function: getgr UID
  911.  - Function: getgr
  912.      Returns a vector of information for the entry for `NAME', `UID',
  913.      or the next entry if no argument is given.  The information is:
  914.  
  915.        0. The name of the group.
  916.  
  917.        1. The encrypted password string.
  918.  
  919.        2. The group ID number.
  920.  
  921.        3. A list of (string) names of users in the group.
  922.  
  923.  - Function: setgrent #T
  924.      Rewinds the group entry table back to the begining.
  925.  
  926.  - Function: setgrent #F
  927.  - Function: setgrent
  928.      Closes the group table.
  929.  
  930.  - Function: getgroups
  931.      Returns a vector of all the supplementary group IDs of the process.
  932.  
  933.  - Function: link OLDNAME NEWNAME
  934.      The `link' function makes a new link to the existing file named by
  935.      OLDNAME, under the new name NEWNAME.
  936.  
  937.      `link' returns a value of `#t' if it is successful and `#f' on
  938.      failure.
  939.  
  940.  - Function: chown FILENAME OWNER GROUP
  941.      The `chown' function changes the owner of the file FILENAME to
  942.      OWNER, and its group owner to GROUP.
  943.  
  944.      `chown' returns a value of `#t' if it is successful and `#f' on
  945.      failure.
  946.  
  947.  - Function: ttyname PORT
  948.      If port PORT is associated with a terminal device, returns a
  949.      string containing the file name of termainal device; otherwise
  950.      `#f'.
  951.  
  952. Unix Extensions
  953. ===============
  954.  
  955. If `'unix' is provided (by linking in `unix.o'), the following
  956. functions are defined:
  957.  
  958. These "priveledged" and symbolic link functions are not in Posix:
  959.  
  960.  - Function: symlink OLDNAME NEWNAME
  961.      The `symlink' function makes a symbolic link to OLDNAME named
  962.      NEWNAME.
  963.  
  964.      `symlink' returns a value of `#t' if it is successful and `#f' on
  965.      failure.
  966.  
  967.  - Function: readlink FILENAME
  968.      Returns the value of the symbolic link FILENAME or `#f' for
  969.      failure.
  970.  
  971.  - Function: lstat FILENAME
  972.      The `lstat' function is like `stat', except that it does not
  973.      follow symbolic links.  If FILENAME is the name of a symbolic
  974.      link, `lstat' returns information about the link itself; otherwise,
  975.      `lstat' works like `stat'.  *Note I/O-Extensions::.
  976.  
  977.  - Function: nice INCREMENT
  978.      Increment the priority of the current process by INCREMENT.
  979.      `chown' returns a value of `#t' if it is successful and `#f' on
  980.      failure.
  981.  
  982.  - Function: acct FILENAME
  983.      When called with the name of an exisitng file as argument,
  984.      accounting is turned on, records for each terminating pro-cess are
  985.      appended to FILENAME as it terminates.  An argument of `#f' causes
  986.      accounting to be turned off.
  987.  
  988.      `acct' returns a value of `#t' if it is successful and `#f' on
  989.      failure.
  990.  
  991.  - Function: mknod FILENAME MODE DEV
  992.      The `mknod' function makes a special file with name FILENAME and
  993.      modes MODE for device number DEV.
  994.  
  995.      `mknod' returns a value of `#t' if it is successful and `#f' on
  996.      failure.
  997.  
  998.  - Function: sync
  999.      `sync' first commits inodes to buffers, and then buffers to disk.
  1000.      sync() only schedules the writes, so it may return before the
  1001.      actual writing is done.  The value returned is unspecified.
  1002.  
  1003. 
  1004. File: scm.info,  Node: Regular Expression Pattern Matching,  Next: Line Editing,  Prev: Posix Extensions,  Up: Packages
  1005.  
  1006. Regular Expression Pattern Matching
  1007. ===================================
  1008.  
  1009.   These functions are defined in `rgx.c' using a POSIX or GNU "regex"
  1010. library.  If your computer does not support regex, a package is
  1011. available via ftp from `prep.ai.mit.edu:/pub/gnu/regex-0.12.tar.gz'.
  1012. For a description of regular expressions, *Note syntax: (regex)syntax.
  1013.  
  1014.  - Function: regcomp PATTERN [FLAGS]
  1015.      Compile a "regular expression".  Return a compiled regular
  1016.      expression, or an integer error code suitable as an argument to
  1017.      `regerror'.
  1018.  
  1019.      FLAGS in `regcomp' is a string of option letters used to control
  1020.      the compilation of the regular expression. The letters may consist
  1021.      of:
  1022.  
  1023.     `n'
  1024.           newlines won't be matched by `.' or hat lists; ( `[^...]' )
  1025.  
  1026.     `i'
  1027.           ignore case.
  1028.      only when compiled with _GNU_SOURCE:
  1029.     `0'
  1030.           allows dot to match a null character.
  1031.  
  1032.     `f'
  1033.           enable GNU fastmaps.
  1034.  
  1035.  - Function: regerror ERRNO
  1036.      Returns a string describing the integer ERRNO returned when
  1037.      `regcomp' fails.
  1038.  
  1039.  - Function: regexec RE STRING
  1040.      Returns `#f' or a vector of integers.  These integers are in
  1041.      doublets.  The first of each doublet is the index of STRING of the
  1042.      start of the matching expression or sub-expression (delimited by
  1043.      parentheses in the pattern).  The last of each doublet is index of
  1044.      STRING of the end of that expression.  `#f' is returned if the
  1045.      string does not match.
  1046.  
  1047.  - Function: regmatch? RE STRING
  1048.      Returns `#t' if the PATTERN such that REGEXP = (regcomp PATTERN)
  1049.      matches STRING as a POSIX extended regular expressions.  Returns
  1050.      `#f' otherwise.
  1051.  
  1052.  - Function: regsearch RE STRING [START [LEN]]
  1053.  - Function: regsearchv RE STRING [START [LEN]]
  1054.  - Function: regmatch RE STRING [START [LEN]]
  1055.  - Function: regmatchv RE STRING [START [LEN]]
  1056.      `Regsearch' searches for the pattern within the string.
  1057.  
  1058.      `Regmatch' anchors the pattern and begins matching it against
  1059.      string.
  1060.  
  1061.      `Regsearch' returns the character position where RE starts, or
  1062.      `#f' if not found.
  1063.  
  1064.      `Regmatch' returns the number of characters matched, `#f' if not
  1065.      matched.
  1066.  
  1067.      `Regsearchv' and `regmatchv' return the match vector is returned
  1068.      if RE is found, `#f' otherwise.
  1069.  
  1070.     RE
  1071.           may be either:
  1072.             1. a compiled regular expression returned by `regcomp';
  1073.  
  1074.             2. a string representing a regular expression;
  1075.  
  1076.             3. a list of a string and a set of option letters.
  1077.  
  1078.     STRING
  1079.           The string to be operated upon.
  1080.  
  1081.     START
  1082.           The character position at which to begin the search or match.
  1083.           If absent, the default is zero.
  1084.  
  1085.      *Compiled _GNU_SOURCE and using GNU libregex only:*
  1086.           When searching, if START is negative, the absolute value of
  1087.           START will be used as the start location and reverse searching
  1088.           will be performed.
  1089.  
  1090.     LEN
  1091.           The search is allowed to examine only the first LEN
  1092.           characters of STRING. If absent, the entire string may be
  1093.           examined.
  1094.  
  1095.  - Function: string-split RE STRING
  1096.  - Function: string-splitv RE STRING
  1097.      `String-split' splits a string into substrings that are separated
  1098.      by RE, returning a vector of substrings.
  1099.  
  1100.      `String-splitv' returns a vector of string positions that indicate
  1101.      where the substrings are located.
  1102.  
  1103.  - Function: string-edit RE EDIT-SPEC STRING [COUNT]
  1104.      Returns the edited string.
  1105.  
  1106.     EDIT-SPEC
  1107.           Is a string used to replace occurances of RE.  Backquoted
  1108.           integers in the range of 1-9 may be used to insert
  1109.           subexpressions in RE, as in `sed'.
  1110.  
  1111.     COUNT
  1112.           The number of substitutions for `string-edit' to perform.  If
  1113.           `#t', all occurances of RE will be replaced.  The default is
  1114.           to perform one substitution.
  1115.  
  1116. 
  1117. File: scm.info,  Node: Line Editing,  Next: Curses,  Prev: Regular Expression Pattern Matching,  Up: Packages
  1118.  
  1119. Line Editing
  1120. ============
  1121.  
  1122. These procedures provide input line editing and recall.
  1123.  
  1124. These functions are defined in `edline.c' and `Iedline.scm' using the
  1125. "editline" or GNU "readline" libraries available from:
  1126.  
  1127.    * `ftp.sys.toronto.edu:/pub/rc/editline.shar'
  1128.  
  1129.    * `prep.ai.mit.edu:pub/gnu/readline-2.0.tar.gz'
  1130.  
  1131. When `Iedline.scm' is loaded, if the current input port is the default
  1132. input port and the environment variable EMACS is not defined,
  1133. line-editing mode will be entered.
  1134.  
  1135.  - Function: default-input-port
  1136.      Returns the initial `current-input-port' SCM was invoked with
  1137.      (stdin).
  1138.  
  1139.  - Function: default-output-port
  1140.      Returns the initial `current-output-port' SCM was invoked with
  1141.      (stdout).
  1142.  
  1143.  - Function: make-edited-line-port
  1144.      Returns an input/output port that allows command line editing and
  1145.      retrieval of history.
  1146.  
  1147.  - Function: line-editing
  1148.      Returns the current edited line port or `#f'.
  1149.  
  1150.  - Function: line-editing BOOL
  1151.      If BOOL is false, exits line-editing mode and returns the previous
  1152.      value of `(line-editing)'.  If BOOL is true, sets the current
  1153.      input and output ports to an edited line port and returns the
  1154.      previous value of `(line-editing)'.
  1155.  
  1156. 
  1157. File: scm.info,  Node: Curses,  Next: Sockets,  Prev: Line Editing,  Up: Packages
  1158.  
  1159. Curses
  1160. ======
  1161.  
  1162. These functions are defined in `crs.c' using the "curses" library.
  1163. Unless otherwise noted these routines return `#t' for successful
  1164. completion and `#f' for failure.
  1165.  
  1166.  - Function: initscr
  1167.      Returns a port for a full screen window.  This routine must be
  1168.      called to initialize curses.
  1169.  
  1170.  - Function: endwin
  1171.      A program should call `endwin' before exiting or escaping from
  1172.      curses mode temporarily, to do a system call, for example.  This
  1173.      routine will restore termio modes, move the cursor to the lower
  1174.      left corner of the screen and reset the terminal into the proper
  1175.      non-visual mode.  To resume after a temporary escape, call *Note
  1176.      refresh: Window Manipulation.
  1177.  
  1178. * Menu:
  1179.  
  1180. * Output Options Setting::
  1181. * Terminal Mode Setting::
  1182. * Window Manipulation::
  1183. * Output::
  1184. * Input::
  1185. * Curses Miscellany::
  1186.  
  1187. 
  1188. File: scm.info,  Node: Output Options Setting,  Next: Terminal Mode Setting,  Prev: Curses,  Up: Curses
  1189.  
  1190. Output Options Setting
  1191. ----------------------
  1192.  
  1193. These routines set options within curses that deal with output.  All
  1194. options are initially `#f', unless otherwise stated.  It is not
  1195. necessary to turn these options off before calling `endwin'.
  1196.  
  1197.  - Function: clearok WIN BF
  1198.      If enabled (BF is `#t'), the next call to `force-output' or
  1199.      `refresh' with WIN will clear the screen completely and redraw the
  1200.      entire screen from scratch.  This is useful when the contents of
  1201.      the screen are uncertain, or in some cases for a more pleasing
  1202.      visual effect.
  1203.  
  1204.  - Function: idlok WIN BF
  1205.      If enabled (BF is `#t'), curses will consider using the hardware
  1206.      "insert/delete-line" feature of terminals so equipped.  If
  1207.      disabled (BF is `#f'), curses will very seldom use this feature.
  1208.      The "insert/delete-character" feature is always considered.  This
  1209.      option should be enabled only if your application needs
  1210.      "insert/delete-line", for example, for a screen editor.  It is
  1211.      disabled by default because
  1212.  
  1213.      "insert/delete-line" tends to be visually annoying when used in
  1214.      applications where it is not really needed.  If
  1215.      "insert/delete-line" cannot be used, curses will redraw the
  1216.      changed portions of all lines.
  1217.  
  1218.  - Function: leaveok WIN BF
  1219.      Normally, the hardware cursor is left at the location of the window
  1220.      cursor being refreshed.  This option allows the cursor to be left
  1221.      wherever the update happens to leave it.  It is useful for
  1222.      applications where the cursor is not used, since it reduces the
  1223.      need for cursor motions.  If possible, the cursor is made
  1224.      invisible when this option is enabled.
  1225.  
  1226.  - Function: scrollok WIN BF
  1227.      This option controls what happens when the cursor of window WIN is
  1228.      moved off the edge of the window or scrolling region, either from a
  1229.      newline on the bottom line, or typing the last character of the
  1230.      last line.  If disabled (BF is `#f'), the cursor is left on the
  1231.      bottom line at the location where the offending character was
  1232.      entered.  If enabled (BF is `#t'), `force-output' is called on the
  1233.      window WIN, and then the physical terminal and window WIN are
  1234.      scrolled up one line.
  1235.  
  1236.      *Note:* in order to get the physical scrolling effect on the
  1237.      terminal, it is also necessary to call `idlok'.
  1238.  
  1239.  - Function: nodelay WIN BF
  1240.      This option causes wgetch to be a non-blocking call.  If no input
  1241.      is ready, wgetch will return an eof-object. If disabled, wgetch
  1242.      will hang until a key is pressed.
  1243.  
  1244. 
  1245. File: scm.info,  Node: Terminal Mode Setting,  Next: Window Manipulation,  Prev: Output Options Setting,  Up: Curses
  1246.  
  1247. Terminal Mode Setting
  1248. ---------------------
  1249.  
  1250. These routines set options within curses that deal with input.  The
  1251. options involve using ioctl(2) and therefore interact with curses
  1252. routines.  It is not necessary to turn these options off before calling
  1253. `endwin'.  The routines in this section all return an unspecified value.
  1254.  
  1255.  - Function: cbreak
  1256.  - Function: nocbreak
  1257.      These two routines put the terminal into and out of `CBREAK' mode,
  1258.      respectively.  In `CBREAK' mode, characters typed by the user are
  1259.      immediately available to the program and erase/kill character
  1260.      processing is not performed.  When in `NOCBREAK' mode, the tty
  1261.      driver will buffer characters typed until a LFD or RET is typed.
  1262.      Interrupt and flowcontrol characters are unaffected by this mode.
  1263.      Initially the terminal may or may not be in `CBREAK' mode, as it is
  1264.      inherited, therefore, a program should call `cbreak' or `nocbreak'
  1265.      explicitly.  Most interactive programs using curses will set
  1266.      `CBREAK' mode.
  1267.  
  1268.      *Note:* `cbreak' overrides `raw'.  For a discussion of how these
  1269.      routines interact with `echo' and `noecho' *Note read-char: Input.
  1270.  
  1271.  - Function: raw
  1272.  - Function: noraw
  1273.      The terminal is placed into or out of `RAW' mode.  `RAW' mode is
  1274.      similar to `CBREAK' mode, in that characters typed are immediately
  1275.      passed through to the user program.  The differences are that in
  1276.      `RAW' mode, the interrupt, quit, suspend, and flow control
  1277.      characters are passed through uninterpreted, instead of generating
  1278.      a signal.  `RAW' mode also causes 8-bit input and output.  The
  1279.      behavior of the `BREAK' key depends on other bits in the terminal
  1280.      driver that are not set by curses.
  1281.  
  1282.  - Function: echo
  1283.  - Function: noecho
  1284.      These routines control whether characters typed by the user are
  1285.      echoed by `read-char' as they are typed.  Echoing by the tty
  1286.      driver is always disabled, but initially `read-char' is in `ECHO'
  1287.      mode, so characters typed are echoed.  Authors of most interactive
  1288.      programs prefer to do their own echoing in a controlled area of
  1289.      the screen, or not to echo at all, so they disable echoing by
  1290.      calling `noecho'.  For a discussion of how these routines interact
  1291.      with `echo' and `noecho' *Note read-char: Input.
  1292.  
  1293.  - Function: nl
  1294.  - Function: nonl
  1295.      These routines control whether LFD is translated into RET and
  1296.      `LFD' on output, and whether RET is translated into LFD on input.
  1297.      Initially, the translations do occur.  By disabling these
  1298.      translations using `nonl', curses is able to make better use of
  1299.      the linefeed capability, resulting in faster cursor motion.
  1300.  
  1301.  - Function: resetty
  1302.  - Function: savetty
  1303.      These routines save and restore the state of the terminal modes.
  1304.      `savetty' saves the current state of the terminal in a buffer and
  1305.      `resetty' restores the state to what it was at the last call to
  1306.      `savetty'.
  1307.  
  1308.